package com.baizhi.service.impl;

import com.baizhi.entity.Pet;
import com.baizhi.mapper.PetMapper;
import com.baizhi.service.IPetService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author huiJie
 * @since 2021-08-27
 */
@Service
public class PetServiceImpl extends ServiceImpl<PetMapper, Pet> implements IPetService {

    @Override
    @Transactional(readOnly = true)
    public PageInfo<Pet> showPagePet(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<>(baseMapper.selectList(null));
    }
}
